Method and system for efficiently using fewer blending units for antialiasing

ABSTRACT

A system and method for providing antialiasing of a graphical image on a display is disclosed. The graphical image is generated from data describing at least one object. The display includes a plurality of pixels. The at least one object includes a plurality of fragments. A portion of the plurality of fragments intersects a pixel of the plurality of pixels. Each of the plurality of fragments including an indication of a portion of a corresponding pixel that is intersected. The system and method include providing at least one active region for the pixel. The at least one active region intersects a first portion of the pixel. The method and system also include providing at least one new region. A first portion of the at least one new region indicates where in the pixel the at least one active region and the fragment intersect. A second portion of the at least one new region indicates where in the pixel the at least one active region and the fragment do not intersect. The method and system further include blending a portion of the fragment in a second portion of the pixel corresponding to the first portion of the at least one new region.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Ser. No. 09/307,317 filed May7, 1999.

The present invention is related co-pending U.S. patent application Ser.No. 09/239,413, entitled “METHOD AND SYSTEM FOR PROVIDING EDGEANTIALIASING” filed on Jan. 28, 1999 and assigned to the assignee of thepresent application. The present invention is also related to co-pendingU.S. patent application Ser. No. 9/296,999, entitled “METHOD AND SYSTEMFOR PROVIDING IMPLICIT EDGE ANTIALIASING” filed on Apr. 22, 1999 andassigned to the assignee of the present application. The presentinvention is related co-pending U.S. patent application Ser. No.08/624,261, entitled “METHOD AND APPARATUS FOR IDENTIFYING ANELIMINATING THREE-DIMENSIONAL OBJECTS VISUALLY OBSTRUCTED FROM A PLANARSURFACE” filed on Mar. 29, 1996 and assigned to the assignee of thepresent application. The present invention is also related to co-pendingU.S. patent application Ser. No. 08/624,260, entitled “GRAPHICSPROCESSORS, SYSTEM AND METHOD FOR GENERATING SCREEN PIXELS IN RASTERORDER UTILIZING A SINGLE INTERPOLATOR” filed on Mar. 29,1996 andassigned to the assignee of the present application.

FIELD OF THE INVENTION

The present invention relates to displaying graphical image on acomputer system and more particularly to a method and system forperforming antialiasing using a single blending unit, which reduces thesize of the system, without requiring additional time in most cases.

BACKGROUND OF THE INVENTION

A conventional computer graphics system can display graphical images ofobjects on a display. The display includes a plurality of displayelements, known as pixels, typically arranged in a grid. In order todisplay objects, the conventional computer graphics system typicallybreaks each object into a plurality of polygons. A conventional systemthen renders the polygons in a particular order. For a three-dimensionalscene, the opaque polygons are generally rendered from front to back asmeasured from the viewing plane of the display. Translucent polygons aredesired to be rendered from back to front. Similarly, a two-dimensionalscene can be displayed. For a two-dimensional scene, polygons arerendered based on a layer order, rather than on a depth value. Shallowerlayers occlude deeper layers.

Each of the polygons includes edges. When rendering an image, theconventional system often renders diagonal lines or polygon edges thatare not perfectly horizontal or vertical. Because each pixel has finitephysical dimensions, edges which are not horizontal or vertical mayappear jagged. For example, consider each pixel to be a square. Adiagonal line or edge rendered using the square pixels will appearjagged, similar to a staircase. This effect is known as aliasing.

In order to reduce aliasing, conventional systems perform antialiasing.Antialiasing helps reduce the effect that the physical dimension of thepixels has on the appearance of objects being displayed. Diagonal linesand edges appear smoother.

Several conventional mechanisms are used to perform antialiasing. Manyof the conventional techniques also evaluate and blend data on thesubpixel level. Each mechanism also has its drawbacks. For example, oneconventional mechanism for antialiasing is conventional supersampling.Conventional supersampling is performed for a portion of the display,called a tile, or the entire display at a time. Each pixel in the tileor display is considered to be an MxN matrix subpixels. Data for eachpolygon in the tile is evaluated at each subpixel. Thus, the depthvalue, color, texture, and other data for the polygon can differ in andis evaluated at each subpixel. Data for the subpixels in each pixel inthe tile are combined to provide the data for each pixel in the tile.Because supersampling evaluates and combines depth values for subpixels,supersampling can help smooth out the staircasing effect on implicitedges. However, the system requires sufficient memory to retain data forthe MxN subpixels in each pixel in a tile to perform supersampling.Therefore, a large amount of memory is required. This increases the sizeof the system. It must also be ensured that there are no artifacts atthe seams between tiles. This slows processing. Furthermore, much moredata is processed for each pixel in the display, regardless of anyuniformity of the subpixels within a pixel. Supersampling is thuscomputation intensive and relatively slow.

Some conventional systems address some of the problems in supersamplingby performing adaptive supersampling. Adaptive supersampling firstidentifies areas where supersampling may be desired, such as near edges.Once this area is identified, supersampling is performed for a tile inincluding this area. In other areas, supersampling is not performed. Forexample, a conventional system could mark the edges of each polygon,indicating that the edges are the exterior of the polygon and thus formthe silhouette of the polygon. This silhouette is antialiased. Althoughadaptive supersampling improves processing speed by reducing the areassubjected to supersampling, a large amount of memory is still required.Furthermore, the identification of areas to be supersampled can becomputation intensive. For example, the determination of the silhouetteof a polygon, discussed above, requires a relatively expensivecomputation. Thus, the system may still be relatively large or slow.

Another conventional mechanism for antialiasing uses an accumulationbuffer (“A-buffer”) and is known as an A-buffer technique. Data for eachpixel in each polygon is processed. During processing, a mask isprovided for each pixel in each polygon. The mask indicates the portionof the pixel covered by the polygon. The mask can thus be viewed asindicating the subpixels each polygon covers. A linked list of thepolygon masks is then provided for each pixel. The linked list typicallyholds a mask, a color value, and other data relating to each polygon'spotential contribution to the display of the pixel. After the entirescene has been stored in the A-buffer, the linked list is then traversedin order to accumulate and render data from the polygons associated witheach pixel. Aliasing is thereby reduced. However, two passes are madethrough the data in order to render objects to the display. The firstpass is to provide the masks for each polygon and to associate thepolygons with particular pixels. The second pass utilizes the datastored for each pixel to determine how data for each pixel is to bedisplayed. Thus, this mechanism is time consuming. The linked list mustalso be managed by the computer graphics system, making the A-buffertechnique more difficult to implement. Typically both an A-buffer and aframe buffer are used in rendering the scene. Therefore, the A-buffertechnique also requires additional memory.

Yet another conventional method for antialiasing could use a weightingfactor. The weighting factor indicates the percentage of a pixel which apolygon occupies. For example, if a polygon occupies an entire pixel,the weighting factor may be one. The weighting factor for pixels at theedges of the polygon may thus be less than one. This weighting factorwould then be taken into account when the data for different polygonsintersecting a pixel are blended.

The above conventional antialiasing techniques have an additionaldrawback. In order to maintain processing speed, the above conventionalmethods may use multiple blending units or a more complex blending unit.A blending unit performs the mathematical operation that blends a storedvalue, such as color for a subpixel, with a color for a fragment. In theconventional antialiasing method that uses weighting, the blending unitmay be more complex in order to account for the weight. Similarly,supersampling, adaptive supersampling, and the A-buffer technique mayuse multiple blending units to maintain processing speed. This isbecause supersampling, adaptive supersampling, and the A-buffertechnique evaluate and combine data at the subpixel level. Blends arethus performed for each subpixel in a pixel to ensure that each subpixelcontributes the correct color and other information to the pixel. Inorder to maintain processing speed when subpixels are used, the blendsfor each subpixel are typically performed in parallel. A blending unitfor each subpixel is used to perform these blends in parallel.

Although a blending unit can be used for each subpixel, as the number ofsubpixels used increases, the number of blending units increasesdramatically. For example, for a 2×2 array of subpixels, four blendingunits are required to perform all operations in parallel. For a 4×4array of subpixels, sixteen blending units are required to perform alloperations in parallel. Providing such a large number of blending unitsconsumes a great deal of space and is quite costly, both of which areundesirable.

Accordingly, what is needed is a system and method for reducing thenumber of blending units used. It would also be desirable if the systemand method did not sacrifice performance. The present inventionaddresses such a need.

SUMMARY OF THE INVENTION

The present invention provides a method and system antialiasing of agraphical image on a display. The graphical image is generated from datadescribing at least one object. The display includes a plurality ofpixels. The at least one object includes a plurality of fragments. Aportion of the plurality of fragments intersects a pixel of theplurality of pixels. Each of the plurality of fragments includes anindication of a portion of a corresponding pixel that is intersected.The system and method comprise providing at least one active region forthe pixel. The at least one active region intersects a first portion ofthe pixel. The method and system also comprise providing at least onenew region. A first portion of the at least one new region indicateswhere in the pixel the at least one active region and the fragmentintersect. A second portion of the at least one new region indicateswhere in the pixel the at least one active region and the fragment donot intersect. The method and system further comprise blending a portionof the fragment in a second portion of the pixel corresponding to thefirst portion of the at least one new region.

According to the system and method disclosed herein, the presentinvention provide antialiasing using fewer blending units, therebydecreasing overall system size, generally without adversely impactingperformance.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a block diagram of a graphical display including a pluralityof polygons.

FIG. 1B is a block diagram depicting a closer view of one of theplurality of polygons in the display.

FIG. 2 is a block diagram depicting a computer graphics system.

FIG. 3 is a block diagram depicting a computer graphics system inaccordance with the present invention.

FIG. 4 is a block diagram depicting a preferred embodiment of anantialiasing unit in accordance with the present invention.

FIG. 5A is a high-level flow chart of a method for blending data for onepixel in accordance with the present invention.

FIG. 5B is a high-level flow chart of a method for antialiasing data fora graphical display in accordance with the present invention.

FIG. 6 is a flow chart of a method for providing and blending regions inaccordance with the present invention.

FIGS. 7A and 7B depict a more detailed flow chart of a method forantialiasing data in accordance with the present invention.

FIG. 8A is a block diagram of one pixel of a graphical display.

FIG. 8B is a block diagram of one pixel of a graphical display includinga plurality of subpixels.

FIG. 8C is the coverage mask for the first fragment intersecting thepixel.

FIG. 8D is the coverage mask for the second fragment intersecting thepixel.

FIG. 9 is a block diagram of a first active region for the pixel.

FIG. 10A is a block diagram of the first active region for the pixelafter the first fragment is processed.

FIG. 10B is a block diagram of a second active region for the pixelafter the first fragment is processed.

FIG. 10C is a block diagram of the accumulator after the fist fragmentis processed.

FIG. 11A is a block diagram of the first active region the pixel afterthe second fragment is processed.

FIG. 11B is a block diagram of the second active region for the pixelafter the second fragment is processed.

FIG. 11C is a block diagram of the third active region for the pixelafter the second fragment is processed.

FIG. 11D is a block diagram of the fourth active region for the pixelafter the second fragment is processed.

FIG. 11E is a block diagram of data in the accumulator for the pixelafter the second fragment is processed.

DETAILED DESCRIPTION OF THE INVENTION

The present invention relates to an improvement in displaying graphicalimages. The following description is presented to enable one of ordinaryskill in the art to make and use the invention and is provided in thecontext of a patent application and its requirements. Variousmodifications to the preferred embodiment will be readily apparent tothose skilled in the art and the generic principles herein may beapplied to other embodiments. Thus, the present invention is notintended to be limited to the embodiment shown but is to be accorded thewidest scope consistent with the principles and features describedherein.

FIG. 1A is a diagram of a graphical image on a display 10 containingthree polygons 20, 30, and 40. The polygons 20, 30, and 40 may be partof objects which are part of a graphical image being shown on thedisplay 10. The polygons 20, 30, and 40 could be part ofthree-dimensional or two-dimensional objects.

FIG. 1B depicts a closer view of a portion of the polygon 30. An edge 32of the polygon 30 is depicted. FIG. 1B also depicts pixels 50, only oneof which is labeled. The pixels in the display 10 have a finite area andare depicted as squares. Because the pixels in the display 10 have afinite size, the edge 32, as well as the other edges not depicted inFIG. 1B, are jagged.

FIG. 2 depicts a simplified block diagram of one embodiment of acomputer graphics system 100. The system 100 is used to display objects,particularly three-dimensional objects. The system 100 is also used inantialiasing described in co-pending U.S. patent application Ser. No.09/239,413, entitled “METHOD AND SYSTEM FOR PROVIDING EDGE ANTIALIASING”filed on Jan. 28, 1999 and assigned to the assignee of the presentapplication. Applicant hereby incorporates by reference theabove-mentioned co-pending application. Portions of the computer system100 are also described more completely in co-pending U.S. patentapplication Ser. No. 08/624,261 entitled “Method and Apparatus forIdentifying and Eliminating Three-Dimensional Objects VisuallyObstructed from a Planar Surface” filed on Mar. 29, 1996. Applicanthereby incorporates by reference the above-mentioned co-pendingapplication. The present invention is also related to co-pending U.S.patent application Ser. No. 08/624,260 entitled “Graphics Processors,System and Method for Generating Screen Pixels in Raster Order Utilizinga Single Interpolator” filed on Mar. 29, 1996. Applicant herebyincorporates by reference the above-mentioned co-pending application.

The computer graphics system 100 includes a central processing unit(CPU) 102, a display 104, a user interface 106 such as a keyboard ormouse or other communicating device, a memory 110, and an imagegenerating unit 120 coupled with a bus 108. The display 104 includes aplurality of pixels, such as the pixels 50 in the display 10. Each ofthe plurality of pixels has an area. The display 104 could include adisplay memory (not shown) to which pixels are written. For example, thedisplay 104 could include a frame buffer. In order generate a graphicalimage, each of the objects in the image may be broken into polygons tobe used in rendering the objects. In the above-mentioned co-pendingapplications, the polygons are preferably rendered in raster order. Thatis, portions of the polygons are rendered in the order of the pixels inthe display 104. However, in the present invention, the polygons may berendered in another order.

The image generating unit 120 includes an interface 121 connected to thebus 108. The interface 121 transmits data to a data processing unit 122.A processor block 124 coupled with the data processing unit 122identifies data describing portions of polygons (“intersectingpolygons”) which intersect the area extending along a z-axis from aselected pixel in an x-y plane corresponding to a screen of the display104. The processor block 124 may include a separate processor for eachintersecting polygon. The data for with the portion of the intersectingpolygon associated with the selected pixel is termed a fragment. Forexample, a fragment includes the color, texture, and depth value for thecorresponding polygon. Data relating to each selected pixel includes afragment for each of the intersecting polygons. In the context of thisdisclosure, a fragment for an intersecting polygon will be described asintersecting the pixel that the polygon intersects.

An obstructed object identifier/removal unit 126 receives at least aportion of the fragment from each intersecting polygon associated withthe selected pixel and removes portions of the fragments for theintersecting polygons which are obstructed. The obstructed objectidentifier/removal unit 126 may perform this function withoutdetermining the precise z-value of the polygon. The interpolator 128receives the fragments for the intersecting polygons for the selectedpixel and interpolates the data, including interpolating texture, color,and alpha values for the fragment. The interpolator 128 also provides amask for each fragment. However, in an alternate embodiment, maskgeneration can be provided by another unit. The mask can be consideredpart of the fragment for an intersecting polygon. The fragments to berendered are provided by the interpolator 128 to a hardware sorter 130,which sorts the fragments, preferably based on the z value or depthvalue, for each fragment.

The sorted fragments for the selected pixel are then provided to anantialiasing unit 140. The antialiasing unit 140 described in theabove-mentioned co-pending applications includes an accumulator 142,blending unit(s) 144. The accumulator 142 includes subpixel buffers, notshown in FIG. 2. In one embodiment of the system disclosed in theabove-mentioned copending application, the accumulator 142 includes aseparate subpixel buffer for each subpixel into which a pixel isdivided.

In the above-mentioned co-pending application, each fragment includes amask and a depth value. The mask, hereinafter referred to as an areamask, indicates a portion of the pixel that the fragment intersects. Thearea mask is used to determine the contribution a fragment makes to thepixel it intersects. The area mask indicates which of the subpixels in apixel the fragment intersects. Where a particular pixel includes an edgeof a polygon, such as the edge 122, the area mask for the fragmentindicates that the fragment only intersects some of the subpixels. Thefragment is blended only in these subpixels. Each subpixel buffer in theaccumulator 142 is used to store information for fragments contained ineach of the subpixels within the selected pixel. The blending unit(s)144 blend the data provided to the subpixel buffers. The antialiaseddata for the selected pixel is then provided to the display 104.

Implicit edge antialiasing is described in U.S. patent application Ser.No. 09/296,999, entitled “METHOD AND SYSTEM FOR PROVIDING IMPLICIT EDGEANTIALIASING” (1197P) filed on Apr. 22, 1999 and assigned to theassignee of the present application. Applicant hereby incorporates byreference the above-mentioned co-pending application. Implicit edges arethose edges which are not explicitly defined, but which are subject toaliasing. The antialiasing described in this co-pending applicationtakes into account differences in depth values at different subpixelsis. In this system and method, each fragment includes a depth value, aslope of the depth value, and an area mask. The method and systemcalculate a subpixel depth value for each fragment using the depth valueand the slope of the depth value of the fragment. The method and systemdetermine whether to blend a portion of the fragment based on theplurality of subpixel depth values for the fragment and the area mask ofthe fragment.

In order to determine whether to blend a portion of the fragment basedon the subpixel depth values, two additional masks are calculated. Adepth mask is first calculated. The depth mask indicates the subpixelsin which a calculated depth value is less than a stored depth value inthe accumulator 144. Thus, the depth mask indicates the subpixels inwhich the fragment would be visible if the fragment exists at thatposition. The depth mask and the area mask are then intersected toprovide a total mask. The total mask should indicate the subpixels inwhich the fragment is visible. The fragment is then blended in thesesubpixels.

Although the methods and systems described in the above-mentionedco-pending applications function adequately for their intended purpose,one of ordinary skill in the art will realize that blends are stillprovided on the subpixel level. Thus, for a 4×4 set of subpixels sixteenblends are performed. In embodiments of the above-mentioned co-pendingapplications, a blending unit(s) 144 is provided for each subpixel inthe accumulator 140. Providing a blending unit 144 for each subpixelallows the blending unit 144 to process a fragment in a single clockcycle. In other words, each new fragment is blended in parallel for eachsubpixel by one of the blending unit(s) 144. However, each blending, orarithmetic, unit 144 is relatively complex. Providing sixteen blendingunits 144, one for each subpixels, consumes a large amount of space. Asthe number of subpixels increases, the number of blending units and,therefore, space consumed increase rapidly. It continues to be desirableto decrease the amount of space and, therefore, silicon, that isconsumed by computer graphics system. Even if fewer blending units couldbe provided, it would still be desirable to use such units efficiently.Accordingly, it would be desirable to decrease the size of the system100 depicted in FIG. 2, without substantially reducing the speed of thesystem 100.

The present invention provides a method and system antialiasing of agraphical image on a display. The graphical image is generated from datadescribing at least one object. The display includes a plurality ofpixels. The at least one object includes a plurality of fragments. Aportion of the plurality of fragments intersects a pixel of theplurality of pixels. Each of the plurality of fragments includes anindication of a portion of a corresponding pixel that is intersected.The system and method comprise providing at least one active region forthe pixel. Each of the at least one active region intersects a firstportion of the pixel. The method and system also comprise providing atleast one new region. A first portion of the at least one new regionindicates where in the pixel each of the at least one active region andthe fragment intersect. A second portion of the at least one new regionindicates where in the pixel each of the at least one active region andthe fragment do not intersect. The method and system further compriseblending a portion of the fragment in a second portion of the pixelcorresponding to the first portion of the at least one new region.

The present invention will be described in terms of a particular systemutilizing a single blending unit. However, one of ordinary skill in theart will readily recognize that this method and system will operateeffectively for other types of systems and another number of blendingunits. The present invention will also be described in terms of aparticular computer system and processing fragments in a particularorder. However, one of ordinary skill in the art will readily recognizethat this method and system will operate effectively for other types ofcomputer systems and processing fragments in another order. Furthermore,the present invention will be described in the context of specificblocks performing certain functions and methods performing certain stepsin a particular order. However, one of ordinary skill in the art willreadily realize that other blocks can provide these functions and thatthe steps may be performed in another order or in parallel. For example,the present invention may be used in another computer graphics systemwhich provides and blends data at the subpixel level but which does notrender polygons in raster order, uses another mechanism or no mechanismto sort and remove obstructed polygons, and does not provide processors124 to process fragments in parallel. Thus, the present invention isconsistent with other architectures and other methods of antialiasing,such as supersampling, adaptive supersampling, or the A-buffertechnique. The present invention can be used in any system in whichmultiple blending units might otherwise be used.

To more particularly illustrate the method and system in accordance withthe present invention, refer now to FIG. 3 depicting a high level blockdiagram of one embodiment of such a system 100′. Many components of thesystem 100′ are analogous to the components depicted in the system 100shown in FIG. 2. These components are labeled similarly. For example,the display 104′ depicted in FIG. 3 corresponds to the display 104depicted in FIG. 2. Thus, the display 104′ may include a display memory(not shown). Referring back to FIG. 3, the antialiasing unit 140′includes accumulator 142′, blending unit(s) 144′, and region generator150. The accumulator 140′ still includes a plurality of subpixel buffers(not shown in FIG. 3). The subpixel buffers store data for fragmentswhich intersect a particular pixel of the display 104′. In a preferredembodiment, the number of blending unit(s) 144′ is one. In an alternateembodiment, the number of blending units is less than the number ofsubpixels.

FIG. 4 depicts a more detailed block diagram of the antialiasing unit140′ in accordance with the present invention. The antialiasing unit140′ includes the accumulator 142′, the blending unit 144′, and theregion generator 150. Also depicted are broadcast unit 147 and currentdata unit 148. The region generator 150 includes an intersection maskgenerator 152 coupled to the region list 154. The region list 154includes two fields, a region number 156 and a region bitfield 158. Theregion number 156 includes active entries 160-175 for each possibleactive region. In a preferred embodiment, the maximum number of possibleactive regions, the number of active entries 160-175, is the same as thenumber of subpixels. In each active entry 160-175, an indication ofwhether a corresponding region is active can be placed. In a preferredembodiment, when a bit in an active entry 160-175 is set, thecorresponding region is active. The region bitfield 158 also includesbitfield entries 180-195 for the possible active regions. Each bitfieldentry 180-195 in the bitfield 158 indicates the subpixels which thecorresponding active region covers.

FIG. 5A depicts a high-level flow chart of a method 200 in accordancewith the present invention for blending data for a fragment inintersecting a selected pixel of the display 104′. A fragment includesan indication of a portion of the pixel that the fragment intersects. Ina preferred embodiment, this indication is provided by a coverage mask.In one embodiment the coverage mask is the same as the area mask,discussed above. However, in another embodiment, the coverage mask couldbe another mask. For example, where the method 200 is used in implicitedge antialiasing, the coverage mask for the fragment may be the totalmask, described above. The method 200 preferably processes the fragmentsintersecting the selected pixel one at a time. Furthermore, each pixelcan be divided into a plurality of subpixels. In a preferred embodiment,each pixel is divided into a four by four array of subpixels.

One or more active region is provided for the pixel, via step 202. Theat least one active region intersects at least a portion of the pixel.Thus, the at least one active region intersects some or all of thesubpixels in the pixel. In a preferred embodiment, a first active regioncovering the entire pixel is provided in step 202. Preferably, the firstactive region is provided by setting the bit in a first active entry160. Also in a preferred embodiment, the first bitfield entry 180indicates that the entire pixel is covered. However, in an alternateembodiment, the first active region may not be the entire pixel. Forexample, where each blending unit is used for a portion of each pixel,the first active region may cover only a portion of the pixel.

At least one new region is provided by determining the intersectionbetween each of the active region(s) and the fragment, via step 204. Ina preferred embodiment, step 204 includes determining the intersectionbetween each of the active region(s) and coverage mask of the fragmentusing the intersection mask generator 152. The number of new regionsprovided in step 204 depends on the number of active regions and whatportion of each active region that the fragment intersects. The newregions are also divided into a first portion of the new region(s) and asecond portion of the new regions. The first portion of the new regionscould include one or more new regions. The first portion includes newregion(s) corresponding to the portions of the active regions that thefragment intersects. Thus, the first portion of the new regions indicatethe portions of the active regions in which data in the accumulator,including color, will change due to the fragment. The second portion ofthe new regions could include zero or more new regions. The secondportion includes new to region(s) corresponding to the portions of theactive region(s) that the fragment does not intersect.

The first portion of the new region(s) are then are then blended usingthe blending unit 144′, via step 206. For each new region in the firstportion of the new regions, the blending unit preferably utilizes oneclock cycle. The results are also stored in the accumulator 142′ in step206. In a preferred embodiment, step 206 includes blending the color forthe new fragment with any color stored in the accumulator 142′ for eachsubpixel in the first portion of the new regions.

FIG. 5B depicts a high-level flow chart of a method 200′ in accordancewith the present invention for providing antialiased data for thegraphical display being shown on the display 104′. Steps 202′ through206′ are analogous to step 202 through 206 of the method 200. Referringback to FIG. 5B, the active region(s) are updated with the newregion(s), via step 208. Thus, the active regions include the firstportion of the new regions, where the previous active regions and thefragment intersected, and the second portion of the new regions, wherethe previous active regions and the fragment did not intersect. Steps204 through 208 are then repeated for each remaining fragment thatintersects the pixel, via step 210. Thus, the intersection between theactive regions and each new fragment is determined. New regions are thenprovided based on the intersections. The color and other data forfragments are blended, and the active regions updated. The processcontinues repeating until all of the fragments intersecting the pixelhave been blended.

Once data for all of the fragments intersecting the pixel have beenblended, the antialiased data for the pixel is provided, via step 212.In a preferred embodiment, step 212 includes providing the datacurrently stored for each subpixel in accumulator 142′ to the display104′. Steps 204 through 212 are then repeated for each pixel remainingin the display, via step 214. Thus, antialiasing can be performed foreach of the objects shown on the display 104′.

FIG. 6 depicts a more detailed flow chart of a method 220 for performingthe step 204 and 206 of generating the at least one new region andblending the fragment. The coverage mask for the fragment is intersectedwith each of the active region(s) to provide an intersection mask foreach of the active region(s), via step 222. In a preferred embodiment,step 222 includes performing a logical AND of the bitfield of each ofthe active region(s) with the coverage mask of the fragment. The activeregions that the fragment intersects can be divided into two groups. Thefirst group includes the active regions that are completely covered bythe coverage mask of the fragment. The second group includes the activeregions that are not completely covered by the coverage mask of thefragment. For each of the active regions which are covered by thecoverage mask of the fragment, the active region is updated as being anew region, via step 224. The active region is updated because the coloror other data stored for the fragment will be changed by the data of thefragment. In a preferred embodiment, step 224 includes indicating theactive region is to be blended, but does not change the active entry160-175 or the bitfield entry 180-185 of the active region. Each activeregion that is not covered by the coverage mask is split into two newregions, via step 226. The first new region includes the portion of theactive region that intersects the fragment. The first new region will beblended because the color and other data for the first new region willbe changed by the data of the fragment. The portions of the fragmentcorresponding to the intersection mask(s) are then blended using theblending unit 144′, via step 228. For each blend based on theintersection mask(s), the blending unit 144″ preferably utilizes oneclock cycle.

FIGS. 7A and 7B depict a more detailed flow chart of a method 250 forproviding antialiased data in accordance with the present invention. Thecurrent pixel is selected, via step 252. The first active region is thenselected as the current active region, via step 254. The first activeregion preferably corresponds to the background. Thus, step 254 includessetting the first active entry 160 in the active region list 156 andindicating in the first bitfield entry 180 that the first active regionencompasses all subpixels 301-316. Thus step 254 also preferablyincludes storing the color and other data for the background in theaccumulator 142′. Step 254 also includes providing data relating to thefirst active region from the region list 156 to the intersection maskgenerator 158.

A first fragment is set as the current fragment, via step 255. The firstfragment will be the fragment for the polygon 372. The current fragmentis then intersected with the first active region, via step 256. In apreferred embodiment, step 256 includes performing a logical AND of thecoverage mask of the fragment and the bitfield 160 of the first activeregion. Step 256 also includes providing an intersection mask based onthe intersection of the coverage mask for the current fragment and thebitfield 160 of the first active region. It is then determined if thecoverage mask for the current pixel covers the current active region,via step 258. In such a case, the intersection mask, the coverage mask,and the current active region cover the same portion of the pixel. Thecoverage mask will cover the first active region if the polygoncorresponding to the fragment covers the entire pixel. If the currentactive region is covered by the coverage mask, then the current activeregion is updated, via step 262. In a preferred embodiment, step 262includes indicating that the current active region will undergo a blendwithout changing the active entry 160-175 or the bitfield entry 180-195corresponding to the current active region. Thus, no new active regionswill be generated if the coverage mask indicates that the fragmentintersects the entire current active region.

If, however, coverage mask of the current pixel does not cover thecurrent active region, then the current active region is split into twonew regions, via step 260. The first new region formed in step 260 isthe same as the intersection mask and includes the portion of thecurrent active region which the fragment intersects. In a preferredembodiment, formation of the first new region in step 260 includessetting a bit in a next active entry of the active entries 160-175 andindicating a next bitfield entry of the next bitfield entries 180-195.The next bitfield entry indicates that the bitfield covers the sameportion of the pixel as the intersection mask. The second new regionincludes the portion of the current active region that the fragment doesnot intersect. Thus, the second new region will not undergo a blend andcorresponds to the complement of the intersection mask. The complementof the intersection mask covers the portion of the current active regionnot included in the intersection mask. Providing the second new regionpreferably includes updating the current active region. Updating thecurrent active region for the second new region changes bitfield in thebitfield entry 180-195 of the current active region. The bitfield forthe current active region is altered to include only the portion of thepixel covered by the complement of the intersection mask.

A blend is then performed for the intersection mask of the currentactive region, via step 264. Representative data for the current region,such as color, stored in the accumulator 142′ is provided via thecurrent data unit 148. The current data unit 148 selects a subpixel inthe current region from the accumulator 142′ and provides therepresentative data from this subpixel. The current data unit 148receives information regarding which of the subpixels in the accumulator142′ to select from the region list 156. The blending unit 144′ blendsthe data, including color, from the fragment with the representativedata in step 264. Step 264 also includes providing the blended data tothe broadcast unit 147. The broadcast unit 147 is provided with theintersection mask from the region list 156. The broadcast unit 147broadcasts the blended data to the subpixels in the intersection mask instep 264. Step 264 preferably takes a single clock cycle.

It is then determined if another active region remains to be intersectedwith the current fragment, via step 266. If so, then the next activeregion is set as the current active region, via step 268. Steps 256through at least 266 are then repeated. If another active region is notto be intersected with the current fragment, then it is determined instep 270 whether another fragment intersecting the pixel is to beprocessed, via step 270. If so, then the next fragment to be processedis set as the current fragment, via step 272. Steps 254 through at least270 are then repeated. If no other fragments intersect the pixel, thenit is determined in step 274 whether all pixels in the display 104′ havebeen processed. If not, then the next pixel is set as the current pixel,via step 276. Steps 254 through at least 276 are then repeated. If nopixels remain, then the method 250 terminates.

To further explain the method 250, refer to FIGS. 8A through 11D. FIG.8A depicts a pixel 300 of the display 104′. The pixel 300 includesfragments 372 and 374 for two polygons. Also shown is the background370. The fragments 372 and 374 share edge 376.

FIG. 8B depicts the same pixel 300, with subpixels 301 through 316shown. In a preferred embodiment, each pixel 300 is broken into a fourby four array of subpixels 301 through 316. However, nothing preventsthe use of another number of subpixels. Whether the fragments 372 and374 intersect at the edge 376 or overlap and occupy the same space atthe edge 376 preferably does not substantially change the presentinvention. However, for ease of explanation, it is presumed that thefragment 372 includes all of subpixels 308, 311-312, and 314-316, aswell as half of subpixels 304, 307, 310, and 313. For ease ofexplanation, it is assumed that the fragment 374 includes all ofsubpixels 305, 309-310, and 313-315, and half of subpixels 301, 306,311, and 316. FIGS. 8C and 8D depict the coverage masks 318 and 319 forthe fragments 372 and 374, respectively.

Referring to FIGS. 7-8D, the fragments 372 and 374 are to be rendered.The pixel 300 is set as the current pixel, via step 252. Thus, thebitfield for the first active region is then set as the entire pixel300. FIG. 9 indicates the first active region 320. Furthermore, data forthe first active region is considered to be background data.Consequently, background data is stored for each of the subpixels301-316. The first fragment is then set as the current fragment, viastep 255. For ease of explanation, the first fragment will be thefragment 374.

The fragment 372 does not cover the entire pixel 300, thus, step 258will indicate that the coverage mask for the fragment does not cover thefirst active region 320. Thus, the first active region 320 will be splitusing step 260. The first new region will be those subpixelscorresponding to the intersection mask generated using the first activeregion 320 and the coverage mask 318 of the fragment 372. The formingthe first new region is preferably includes setting the second activeentry 161 and indicating in the second bitfield entry 181 that the firstnew region corresponds to the intersection mask for the fragment 372.Because the first active region 320 covered the entire pixel 300, theintersection mask for the fragment 372 is the same as the coverage mask318. FIG. 10B depicts the first new region 322. The second new regionformed in step 260 will be the remaining portion of the first activeregion 320. Thus, the second new region is merely an updated version ofthe first active region. FIG. 10A depicts the first active region 320′after being updated using the complement of the coverage mask. Note thatwhen step 260 is completed, the active regions for the next fragmentprocessed include the first active region 320′ and a second activeregion 322 that is the first new region 322.

A blend is then provided for each intersection mask, via step 264. Step264 includes blending the data from the fragment 372 with the backgrounddata and providing the results to the appropriate portions of theaccumulator 142′. FIG. 10C depicts the subpixel buffers 331-345 for theaccumulator 142′. The “x” indicates background data. The “a” indicatesdata for the fragment 372 which has been blended with background data.Thus, subpixel buffers 331-333, 335-336, and 339 include backgrounddata. The remaining subpixel buffers 334, 336-338, and 340-346 includeblended data.

Because there are no more active regions to be blended and because thefragment 374 is to be processed, the fragment 374 is set as the currentfragment in step 272. The first active region 322′ is set as the currentactive region, via step 254. The intersection between the fragment 374and the first active region 320′ is then determined. The fragment 374does not cover the entire first active region. Therefore, the firstactive region 320′ will be split, via step 260. The first new regionwill be those subpixels corresponding to the intersection mask generatedusing the first active region 320′ and the coverage mask 319 of thefragment 374. The forming the first new region is preferably includessetting the second third active entry 162 and indicating in the thirdbitfield entry 182 that the first new region corresponds to theintersection mask for the fragment 374 and the first active region 320′.FIG. 11C depicts the first new region 324, or the third active region324. The second new region formed in step 260 will be the remainingportion of the first active region 320′. Thus, the second new region ismerely an updated version of the first active region 320′. FIG. 11Adepicts the first active region 320″ after being updated using thecomplement of the coverage mask.

A blend is then provided for each intersection mask, via step 264. Step264 includes blending the data from the fragment 374 with the backgrounddata and providing the results to the appropriate portions of theaccumulator 142′. The blend in step 264 consumes one clock cycle toblend the data in the subpixels corresponding to the third active region324.

It is then determined that the second active region is to be processed,via step 266. The second active region 322 is set as the current activeregion, via step 268. The intersection between the fragment 374 and thesecond active region 322 is then determined. The fragment 374 does notcover the entire second active region. Therefore, the second activeregion 322 will be split, via step 260. The first new region will bethose subpixels corresponding to the intersection mask generated usingthe second active region 322 and the coverage mask 319 of the fragment374. The forming the first new region is preferably includes setting thefourth third active entry 163 and indicating in the fourth bitfieldentry 183 that the first new region corresponds to the intersection maskfor the fragment 374 and the second active region 322. FIG. 11D depictsthe first new region 326 formed, or the fourth active region 326. Thesecond new region formed in step 260 will be the remaining portion ofthe second active region 322. Thus, the second new region is merely anupdated version of the second active region 322. FIG. 11B depicts thesecond active region 322′ after being updated using the complement ofthe coverage mask.

A blend is then provided for each intersection mask, via step 264. Step264 includes blending the data from the fragment 374 with the data forthe second active region 322 and providing the results to theappropriate portions of the accumulator 142′. The blend in step 264consumes one clock cycle to blend the data in the subpixelscorresponding to the fourth active region 326. FIG. 11E depicts thesubpixel buffers 331-345 for the accumulator 142′ after the blend. The“x” indicates background data. The “a” indicates data for the fragment372 which has been blended only with background data. A “b” indicatesdata for the fragment 374 that has been blended only with backgrounddata. A “c” indicates data for the fragment 374 that has been blendedwith the “a” data. Thus, subpixel buffers 332-333 include backgrounddata, subpixel buffers 334, 337-338, and 342 include data for thefragment 372 which has been blended only with background data, subpixelbuffers 331, 335-336, and 339 include data for the fragment 374 that hasbeen blended only with background data. Subpixel buffer 340, 341, and342-346 include data that has been blended for the background, thefragment 372, and the fragment 374.

Using the methods 200, 220, and 250, fewer blending units 142′ can beused. In a preferred embodiment, a single blending unit 142′ can be usedfor all subpixels. Thus, a great deal of space is saved in the system100′. Although blending utilizes a single clock cycle for each blendand, therefore, each intersection mask, this generally does not greatlyslow performance. Typically, the number of fragments having an edge in aparticular pixel is limited. Thus, the situation shown in FIG. 8A isvery unusual. Instead, in the vast majority of cases each fragmentoccupies an entire pixel. Thus, there is typically one blend performedper fragment. As a result, performance is not slowed. This is becauseblending units which process a portion of a fragment for a singlesubpixel buffer also use a clock cycle to provide a blend. Thus, spaceis saved, generally without sacrificing performance.

In addition, the present invention could be used in conjunction withconventional antialiasing techniques, such as supersampling, adaptivesupersampling, the A-buffer technique, and the conventional techniquewhich uses weighting. Use of the present invention in performingsupersampling, for example, would allow a single blending unit to beused in supersampling while generally maintaining processing speed.Similarly, the silhouette, discussed above with respect to adaptivesupersampling, could be handled similarly to the masks discussed withrespect to antialiasing and implicit edge antialiasing. Thus, adaptivesupersampling is also consistent with the present invention.Consequently, the method and system in accordance with the presentinvention can also reduce the number of blending units used inconventional antialiasing techniques, usually without sacrificingperformance.

Even in the unusual situation where multiple fragments include edges ata pixel, any degradation in performance is generally graceful. In otherwords, as more fragments have edges at the same pixel, more activeregions will be generated. More intersection masks will also begenerated for each fragment. In a preferred embodiment, eachintersection mask results in a blend. The more intersection masks, themore blends. Generally, there is one blend for each active regionintersected (each intersection mask generated). Thus the system mayslow. However, the system should continue to function. Thus, any loss inperformance encountered is graceful.

A method and system has been disclosed for efficiently providingantialiasing using fewer blending units. Software written according tothe present invention can be stored in some form of computer-readablemedium, such as memory or CD-ROM, or transmitted over a network, andexecuted by a processor.

Although the present invention has been described in accordance with theembodiments shown, one of ordinary skill in the art will readilyrecognize that there could be variations to the embodiments and thosevariations would be within the spirit and scope of the presentinvention. Accordingly, many modifications may be made by one ofordinary skill in the art without departing from the spirit and scope ofthe appended claims.

What is claimed is:
 1. A method for providing antialiasing of agraphical image on a display, the graphical image generated from datadescribing at least one object, the display including a plurality ofpixels, the at least one object including a plurality of fragments, aportion of the plurality of fragments intersecting a pixel of theplurality of pixels, each of the plurality of fragments including anindication of a portion of a corresponding pixel that is intersected,the method comprising the steps of: (a) providing at least one activeregion for the pixel, each of the at least one active regionintersecting a first portion of the pixel; (b) providing at least onenew region, a first new region of the at least one new region indicatingwhere in the pixel the at least one active region and the fragmentintersect, a second new region of the at least one new region indicatingwhere in the pixel the at least one active region and the fragment donot intersect; (c) blending a portion of the fragment in a secondportion of the pixel corresponding to the first new region of the atleast one new region; and (d) updating the at least one active region toinclude each of the at least one new region.
 2. The method of claim 1further comprising the steps of: (e) repeating steps (b) through (d) foreach remaining fragment in the portion of the plurality of fragments;and (f) providing antialiased data for the pixel based on a secondportion of the plurality of fragments that have been blended.
 3. Themethod of claim 2 further comprising the step of: (g) repeating steps(a) through (f) for each of the plurality of pixels.
 4. The method ofclaim 1 wherein for each fragment the indication of the portion of thecorresponding pixel that is intersected further includes a coveragemask, and wherein the new region providing step (b) further includes thestep of: (b1) intersecting the coverage mask for the fragment with eachof the at least one active region to provide an intersection mask foreach of the at least one active region.
 5. The method of claim 4 whereinfor each of the at least one active regions, the new region providingstep (b) further includes the steps of: (b2) updating an active regionif the active region has an intersection mask that covers the activeregion; and (b3) splitting the active region into the first new regionand the second new region if the active region is not the same as theintersection mask.
 6. The method of claim 5 wherein the blending step(c) further includes the step of: (c) for each of the at least oneactive region, blending the portion of the fragment in a second portionof the pixel corresponding to the intersection mask.
 7. The method ofclaim 1 wherein each of the plurality of pixels further includes aplurality of subpixels, wherein the first portion of the at least onenew region indicates a first portion of the plurality of subpixels inwhich each of the at least one active region and the fragment intersect,wherein the second portion of the at least one new region indicates asecond portion of the plurality of subpixels in which each of the atleast one active region and the fragment do not intersect.
 8. The methodof claim 1 wherein each of the plurality of fragments further includes acolor, and wherein blending step (c) further includes the step of: (c1)blending the color of the fragment in the first portion of the at leastone new region.
 9. The method of claim 1 wherein the at least one newregion includes a single new region.
 10. The method of claim 1 whereinthe at least one new region includes a plurality of new regions, whereinthe first portion of the at least one new region includes at least oneof the plurality of new regions, and wherein the second portion of theat least one new region includes at least one remaining region of theplurality of new regions.
 11. The method of claim 1 wherein theplurality of fragments are rendered pixel by pixel.
 12. A method forproviding antialiasing of a graphical image on a display, the graphicalimage provided from data describing at least one object, the displayincluding a plurality of pixels, the at least one object including aplurality of fragments, a portion of the plurality of fragmentsintersecting a pixel of the plurality of pixels, each of the pluralityof fragments including a coverage mask indicating of a portion of acorresponding pixel that is intersected, the method comprising the stepsof: (a) providing at least one active region for the pixel, each of theat least one active region intersecting a first portion of the pixel;(b) intersecting the coverage mask for the fragment with each of the atleast one active region to provide an intersection mask for each of theat least one active region. (c) for each of the at least one activeregion, updating an active region of the at least one active region ifthe intersection mask is the same as the active region; (d) for each ofthe at least one active region that is not the same as the intersectionmask, splitting the active region into a first new region and a secondnew region, the first new region being the intersection mask and thesecond new region being a complement of the intersection mask, die firstnew region being added to the at least one active region and the secondnew region an update of the active region; (c) blending a portion of thefragment in a second portion of the pixel corresponding to theintersection mask for each of the at least one active region; (f) addingeach of the at least one new region to the at least one active region;and (g) repeating steps (b) through (f) for each of the plurality offragments intersecting the pixel.
 13. The method of claim 12 wherein theplurality of fragments are rendered pixel by pixel.
 14. A system forproviding antialiasing of a graphical image from data describing atleast one object, the at least one object including a plurality offragments, the system comprising: a display including a plurality ofpixels, each of the plurality of pixels including a number of subpixels;means coupled to the display for providing a plurality of fragments forthe at least one object, the plurality of fragments intersecting theplurality of pixels, each of the plurality of fragments including anindication of a portion of a corresponding pixel that is intersected; anantialiasing unit, coupled with the display, for providing antialiasingof each of the plurality of fragments based on the indication of theextent a corresponding pixel is intersected, the antialiasing unitfurther including an accumulator for storing data relating to the pixel;a region generator coupled with the accumulator for indicating at leastone active region for the pixel and at least one new region, each of theat least one active region intersecting a portion of the pixel, the atleast one new region being based on an intersection between the at leastone active region and the fragment, a first new region of the at leastone new region indicating where in the pixel the at least one activeregion and the fragment intersect, a second new region of the at leastone new region indicating where in the pixel the at least one activeregion and the fragment do not intersect, the region generatorindicating the first portion of the at least one new region to beblended, the region generator adding the at least one new region to theat least one active region; and a blending unit coupled with theaccumulator and the region providing, the blending unit blending aportion of the fragment in the first portion of the at least one newregion in the fragment.
 15. The system of claim 14 wherein a number ofthe at least one blending unit is less than the number of subpixels. 16.The system of claim 14 wherein the at least one blending unit furtherincludes a single blending unit.
 17. The system of claim 14 wherein theregion generator further include: the region list for indicating the atleast one active region for the pixel; the intersection generatorcoupled with the region list determining at least one new region for theat least one active region and providing the region list with the atleast one new region.
 18. The system of claim 14 wherein the pluralityof fragments are rendered pixel by pixel.
 19. A computer-readable mediumcontaining a program for antialiasing a graphical image on a display,the graphical image provided from data describing at least one object,the display including a plurality of pixels, the at least one objectincluding a plurality of fragments, a portion of the plurality offragments intersecting a pixel of the plurality of pixels, each of theplurality of fragments including an indication of a portion of acorresponding pixel that is intersected, the program includinginstructions for: (a) providing at least one active region for thepixel, the at least one active region intersecting a first portion ofthe pixel; (b) providing at least one new region, a first portion of theat least one new region indicating where in the pixel the at least oneactive region and the fragment intersect, a second new region of the atleast one new region indicating where in the pixel the at least oneactive region and the fragment do not intersect; (c) blending a portionof the fragment in a second portion of the pixel corresponding to thefirst portion of the at least one new region; and (d) updating the atleast one active region to include each of the at least one new region.20. The computer-readable medium of claim 19 wherein for each fragmentthe indication of the portion of the corresponding pixel that isintersected further includes a coverage mask, and wherein for each ofthe at least one active region, the new region providing stepinstructions (b) further includes instructions for: (b1) intersectingthe coverage mask for the fragment with an one active region to providean intersection mask for the active region; (b2) updating the activeregion if the active region has an intersection mask that covers thefirst active region; and (b3) splitting the active region into the firstnew region and the second new region if the active region is not thesame as the intersection mask, the second new region corresponding tothe intersection mask and being part of the first portion of the atleast one new region.
 21. The computer-readable media of claim 20wherein the plurality of fragments are rendered pixel by pixel.
 22. Thecomputer-readable medium of claim 19 wherein each of the plurality ofpixels further includes a plurality of subpixels, wherein the first newregion of the at least one new region indicates a first portion of theplurality of subpixels in which each of the at least one active regionand the fragment intersect, wherein the second new region of the atleast one new region indicates a second portion of the plurality ofsubpixels in which each of the at least one active region and thefragment do not intersect.
 23. The computer-readable medium of claim 19wherein the at least one new region includes a single new region. 24.The computer-readable medium of claim 19 wherein the at least one newregion includes a plurality of new regions, wherein the first new regionof the at least one new region includes at least one of the plurality ofnew regions, and wherein the second new region of the at least one newregion includes at least one remaining region of the plurality of newregions.
 25. The computer-readable media of claim 19 wherein theplurality of fragments are rendered pixel by pixel.
 26. Acomputer-readable medium containing a program for providing antialiasingof a graphical image on a display, the graphical image being providedfrom data describing at least one object, the display including aplurality of pixels, the at least one object including a plurality offragments, a portion of the plurality of fragments intersecting a pixelof the plurality of pixels, each of the plurality of fragments includinga coverage mask indicating of a portion of a corresponding pixel that isintersected, the program including instructions for: (a) providing atleast one active region for the pixel, each of the at least one activeregion intersecting a first portion of the pixel; (b) intersecting thecoverage mask for the fragment with each of the at least one activeregion to provide an intersection mask for each of the at least oneactive region. (c) for each of the at least one active region, updatingan active region of the at least one active region if the intersectionmask is the same as the active region; (d) for each of the at least oneactive region that is not the same as the intersection mask, splittingthe active region into a first new active region and a second newregion, the first new region being the intersection mask and the secondnew region being a complement of the intersection mask; (e) blending aportion of the fragment in a second portion of the pixel correspondingto the intersection mask for each of the at least one active region; and(f) adding each of the at least one new region to the at least oneactive region (g) repeating steps (b) through (f) for each of theplurality of fragments intersecting the pixel.
 27. The computer-readablemedia of claim 26 wherein the plurality of fragments are rendered pixelby pixel.